<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>Date 对象的世界时方法</title>
</head>
<body>
<script>
    var localTime = new Date();
    var html = '<p>UTC Time is ' + localTime.toUTCString() + '</p>';
    html += '<p>Local Time is ' + localTime.toLocaleString() + '</p>';
    html += '<p>Time Zone Offse is ' + localTime.getTimezoneOffset() + '</p>';
    html += '<p>Using toTimeString() gives: ' + localTime.toLocaleTimeString() + '</p>';
    html += '<p>Using toLocalDateString() gives: ' + localTime.toLocaleDateString() + '</p>';
    html += '<p>Using toDateString() gives: ' + localTime.toDateString() + '</p>';
    document.write(html);
</script>
</body>
</html>